<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>XX系统 - 租户信息管理</title>
<link rel="stylesheet" href="../../css/main.css">
<link rel="stylesheet"
	href="../../lib/font-awesome/css/font-awesome.css">
</head>
<style>
#mess {
	color: red;
}
</style>
<body>
	<div class="box">
		<h3>租户信息管理</h3>
		<div class="actions">
			<div>
				<a class="btn btn-primary" href="add.jsp">添加租户信息</a>
				<!-- <a class="btn btn-primary" href="query.jsp">租户信息信息查询</a> -->
			</div>
		</div>

		<table class="list">
			<tr>
				<th>序号</th>
				<th>姓名</th>
				<th>电话</th>
				<th>性别</th>
				<th>籍贯</th>
				<th>身份证号</th>
				<th>添加时间</th>
				<th>操作</th>
			</tr>
			<c:forEach items="${lc }" var="list" begin="${page.pageStart }"
				end="${page.pageStart+page.pageSize-1 }" varStatus="state">
				<tr>
					<td>${state.index+1 }</td>
					<td>${list.l_name }</td>
					<td>${list.l_tel }</td>
					<td>${list.l_sex }</td>
					<td>${list.l_native_place }</td>
					<td>${list.l_id_card }</td>
					<td>${list.l_create_time }</td>
					<td>
						<a class="fa fa-pencil" title="编辑"
						href="../editServlet?action=editShow&l_id=${list.l_id }"></a>
						&nbsp;&nbsp; 
						<a class="fa fa-remove" title="删除"
						href="../deleteServlet?l_id=${list.l_id }" onclick="return confirmDelete(1)"></a></td>
			</c:forEach>
		</table>
		<div class="pager-info">
			<div>
				共有 ${lc.size() } 条记录，第 ${page.pageNum }/${page.pageMax }页&nbsp;&nbsp;&nbsp;&nbsp;<span
					id="mess">${mess }</span>
			</div>
			<div>
				<ul class="pagination">
					<li class="paginate_button previous disabled }"><a
						href="../findLesseeServlet?pageNum=${page.pageNum-1 }">上一页</a></li>
					<li class="paginate_button active"><a
						href="../findLesseeServlet?pageNum=${page.pageNum }">${page.pageNum }</a></li>
					<li class="paginate_button next disabled"><a
						href="../findLesseeServlet?pageNum=${page.pageNum+1 }">下一页</a></li>
				</ul>
			</div>
		</div>
	</div>
	<c:remove var="mess" scope="session" />
	<script src="../../lib/jquery/jquery.js"></script>
	<script>
		function confirmDelete(id) {
			if (confirm("确定要删除码？")) {
				alert('发送删除请求，刷新页面（不要异步）');
				return true;
			}
			return false;
		}
	</script>
</body>
</html>